#!/usr/bin/env node
const http = require('http')

const port = process.env.PORT || 3000

http.createServer(function (request, response) {
  response.end('Hello, world!')
}).listen(port, err => {
  if (err) {
    console.log(`Something bad happened: ${err}.`)
  } else {
    console.log(`Server is listening on ${port}.`)
  }
})
